<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/4/5
  Time: 17:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>图书在线借阅系统|会员主页</title>
    <link rel="stylesheet" type="text/css" href="lib/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="lib/layui/css/book.css">
    <script type="text/javascript" src="lib/layui/layui.js"></script>
    <script src="lib/js/jquery-3.4.1.js" type="text/javascript" charset="utf-8"></script>
    <style>
        body {
            background: url("lib/Images/bg-3.jpg") no-repeat;
            background-size: cover;
        }
    </style>

</head>
<body>
<div style="width: 900px; height: 300px; margin-top: 80px; margin-left: 200px; position: relative;">
    <div class="layui-container-box" style="width: 400px;background-color: #cccccc; margin-left: 180px;margin-top: 180px;">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend  style="margin-right: 30px">常用功能</legend>
        </fieldset>
        <div class="layui-bg-gray" style="padding: 20px;">
            <div class="layui-card-body">
                图书查询：根据多条件查询图书、查看图书详情 <br/>
                图书借阅：查询书名借阅、批量借阅书籍<br/>
                借阅历史信息：显示会员借阅归还情况<br/>

            </div>
        </div>
    </div>

</div>
</body>
</html>
<script type="text/javascript">
    layui.use('form',function () {
        var form = layui.form;
        //自定义验证规则
        form.verify({
            name:function (value) {
                if (value.length < 1){
                    return '图书名称不能为空';
                }
            },
            author:[/[\u4e00-\u9fa5]{1,20}|[a-zA-Z\.\s]{1,20}/,"作者姓名只能是中文或者英文,且不能超过20个字符"],
            stock: [/^[0-9]*$/, "请输入正确的页数"],
            price: [/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, "请输入正确的价格"]
        })
    })
</script>

